package com.wanchuang.shengfubao.adapter;

import android.content.Context;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.wanchuang.shengfubao.R;
import com.wanchuang.shengfubao.help.GlideHelper;
import com.wanchuang.shengfubao.proto.Mystock;

public class MachinesAdapter extends BaseQuickAdapter<Mystock.myMachineGcTypeList.goodsInfo, BaseViewHolder> {
    public MachinesAdapter(Context context) {
        super(R.layout.item_machines);
    }

    @Override
    protected void convert(BaseViewHolder helper, Mystock.myMachineGcTypeList.goodsInfo item) {
        GlideHelper.INSTANCE.loadImage(helper.getView(R.id.iv_image), item.getGoodsImage());
        helper.setText(R.id.tv_name, item.getGoodsName())
                .setText(R.id.tv_serial, item.getGoodsSerial())
                .setText(R.id.tv_action, item.getGoodsActivationNum())
                .setText(R.id.tv_un_action, item.getGoodsUnactivationNum());

    }

}
